import hashlib
path = './mqtt.txt'
path2 = './mqtt_orginal.txt'
def printAndDigest(path_name):
    f = open(path_name,'r',encoding='utf-8')
    contents = f.read()
    no_space_data = contents.replace(' ', '')
    no_wrap_data = no_space_data.replace('\n', '')
    sha256Hash = hashlib.sha256()
    sha256Hash.update(no_wrap_data.encode("utf-8"))
    print(no_wrap_data)
    return sha256Hash.hexdigest()
print(printAndDigest(path)==printAndDigest(path))
